package ru.amse.baltijsky.javascheme.tree;

/**
 * The class that holds the schema tree that is the abstract representation of the code that is given as the program input.
 * The data is represented via the framework of internal representation classes found in this package.
 *
 * @see ru.amse.baltijsky.javascheme.tree
 */
public class SchemaTree {
    /**
     * The root of the loadTree tree that
     */
    private SchemaNode root = null;
    /**
     * Textual description for the schema tree.
     */
    private String description = "";

    /**
     * Creates a schema tree with the specified root.
     *
     * @param root schema tree root
     */
    public SchemaTree(SchemaNode root) {
        this.root = root;
    }

    /**
     * Creates a schema tree with the specified root and textual description.
     *
     * @param root        schema tree root
     * @param description textual description
     */
    public SchemaTree(SchemaNode root, String description) {
        this.root = root;
        this.description = description;
    }

    /**
     * A getter for the root of the loadTree tree.
     *
     * @return the root of the loadTree tree
     */
    public SchemaNode getRoot() {
        return root;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
